Repository navigation
Count provider-owned windows on AppKit, not listed ones - #31
Merged
Merged
Conversation
The diagnostics settled it: "UI lifecycle VM window" content=NyUiContainer visible=0 released_when_closed=0 refs=24. The window was closed and the provider had let go; AppKit was holding it, through twenty-four references, and no amount of settling was going to change that. So the metric was wrong, not the provider. Two AppKit facts break the GTK-shaped question. A closed window stays in the application's window list until it deallocates, which AppKit defers indefinitely, and the lifecycle fixture never orders its window in, so isVisible cannot separate a live window from a released one either -- both read false. The provider does leave a usable marker: it installs a delegate when it creates a window and clears it on every release path -- close, dispose and the creation rollback. Counting its own content views that still have a delegate asks exactly what the fixture means, has the provider let this window go, and stays independent of the provider's handle map, which is what a stale handle could otherwise hide. The assertions and their count are unchanged, so the fixture still reports the 235 checks the display contract requires. My two earlier attempts at this failure -- a run-loop turn, then a bounded settle -- were both wrong, and both were theories the evidence then contradicted. This one follows from what the run actually printed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The diagnostics settled it: "UI lifecycle VM window" content=NyUiContainer visible=0 released_when_closed=0 refs=24. The window was closed and the provider had let go; AppKit was holding it, through twenty-four references, and no amount of settling was going to change that.
So the metric was wrong, not the provider. Two AppKit facts break the GTK-shaped question. A closed window stays in the application's window list until it deallocates, which AppKit defers indefinitely, and the lifecycle fixture never orders its window in, so isVisible cannot separate a live window from a released one either -- both read false.
The provider does leave a usable marker: it installs a delegate when it creates a window and clears it on every release path -- close, dispose and the creation rollback. Counting its own content views that still have a delegate asks exactly what the fixture means, has the provider let this window go, and stays independent of the provider's handle map, which is what a stale handle could otherwise hide. The assertions and their count are unchanged, so the fixture still reports the 235 checks the display contract requires.
My two earlier attempts at this failure -- a run-loop turn, then a bounded settle -- were both wrong, and both were theories the evidence then contradicted. This one follows from what the run actually printed.